package com.woniuxy.microsystemserver.service.impl;

import com.woniuxy.bean.SysRateBean;
import com.woniuxy.microsystemserver.dao.SysRateDao;
import com.woniuxy.microsystemserver.service.SysRateService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Description:     系统费率业务服务层实现类
 *
 * @Auther: HanLei
 * @Date: 2021/4/7:14:29
 */
@Service
public class SysRateServiceImpl implements SysRateService {
    @Resource
    private SysRateDao sysRateDao;

    @Override
    public List<SysRateBean> getAllRate() {

        try{
            List<SysRateBean> rates = sysRateDao.getAllRate();
            return rates;
        }catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }

    @Override
    public int updateRate(List<SysRateBean> sysRateBeans) {
        try{
            int row = sysRateDao.updateRate(sysRateBeans);
            return row;
        }catch (Exception e) {
            e.printStackTrace();
            return 0;
        }
    }
}
